package cn.kgm.coupon;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/**
 * 如何使用nacos当做配置中心
 * 1，引入依赖
 *
 <dependency>
 <groupId>com.alibaba.cloud</groupId>
 <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
 </dependency>
 2，创建一个bootstrap.properties
 spring.application.name=kashop-coupon
 spring.cloud.nacos.config.server-addr=192.168.101.9:8848
 3,在nacos 创建文件，服务名.properties
  给使用注解的类，添加
 @RefreshScope（实时刷新）
 @Value 读取配置
 */
@EnableDiscoveryClient
@SpringBootApplication
public class KashopCouponApplication {
    public static void main(String[] args) {
        SpringApplication.run(KashopCouponApplication.class,args);
    }
}
